ifneq ($(KERNELRELEASE),)

        obj-m := cdev.o

else

        KDIR:=/lib/modules/$(shell uname -r)/build
        PWD:=$(shell pwd)

all:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif

clean:
        rm -f *.o *.ko *.mod.c .hello* Module.* modules.*
